home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d8
/
tadex10.arc
/
EXEC.SLT
next >
Wrap
Text File
|
1989-04-23
|
3KB
|
94 lines
// EXEC.SLT
// Version 1.00
//
// By John Abatte
// April 22, 1989
//
// This is the main Logon script for EXEC-PC, to be used with EXECTIME.SLT.
// The two areas to modify are imediately below and should be pretty self
// explanatory. This script may also be used by itself as a logon script.
// To disable the download feature, either comment out the last line by
// putting a double slash in front of "call("download.slc);", or by simply
// deleting the line.
str user_name[32] = "John;Abatte"; // Put YOUR name here
str cap_file[60] = "c:\telix\cap\exec-pc.cap"; // YOUR cap dir here
main()
{
int stat;
int tm;
int t1,t2,t3,t4,t5,t6;
_scr_chk_key = 1;
flushbuf();
alarm(1); // delete if using timed script
capture("*CLOSE*"); // close any open capture file
capture(cap_file); // open CAP file for EXEC session
t1 = track("FIRST name ->", 0);
t2 = track("Password ->", 0);
t3 = track("updated bulletins", 0);
t4 = track("continue ->", 0);
t5 = track("0 messages found", 0);
t6 = track("WXG, ?=HELP) ->", 0);
tm = timer_start(1800); // wait up to 3 minutes for login
while (not time_up(tm))
{
terminal(); // let Telix process any chars and keys
stat = track_hit(0); // see which (if any) track was hit
if (stat == t1) // send name
{
delay_scr(1);
cputs(user_name);
cputs("^M");
}
if (stat == t2) // send password
{
delay_scr(1);
cputs(_entry_pass);
cputs("^M");
}
if (stat == t3) // skip the bulletins
{
delay_scr(10);
cputs("q");
}
if (stat == t4) // "continue"
{
delay_scr(1);
cputs("^M");
}
if ((stat != t5) && (stat == t6))
{
delay_scr(2);
cputs("r"); // read our mail
delay_scr(1);
cputs("n");
break; // end Logon sequence
}
}
if (time_up(1)) // force a hangup if timeout
{
prints("Logon failed!");
hangup();
capture("*CLOSE*");
}
timer_free(tm); // free timer channel
track_free(0); // and all track channels
if(waitfor("WXG, ?=HELP) ->",1200)) // wait up to 2 min for mail read
{
delay_scr(1);
cputs("fa");
}
call("download.slc"); // start the download script
}